<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php echo hook('syncMeta');?>
<?php $oneplus_seo_meta = get_seo_meta($vars,$seo); ?>
<?php if($oneplus_seo_meta['title']): ?><title><?php echo ($oneplus_seo_meta['title']); ?>-<?php echo modC('WEB_SITE_NAME',L('_OPEN_SNS_'),'Config');?></title>
<?php else: ?>
<title><?php echo modC('WEB_SITE_NAME',L('_OPEN_SNS_'),'Config');?></title><?php endif; ?>
<?php if($oneplus_seo_meta['keywords']): ?><meta name="keywords" content="<?php echo ($oneplus_seo_meta['keywords']); ?>"/><?php endif; ?>
<?php if($oneplus_seo_meta['description']): ?><meta name="description" content="<?php echo ($oneplus_seo_meta['description']); ?>"/><?php endif; ?>
<link href="/Public/zui/css/zui.css" rel="stylesheet">
<link href="/Public/zui/css/zui-theme.css" rel="stylesheet">
<link href="/Theme/Want/Public/css/iconfont.css" rel="stylesheet"/>
<link href="/Theme/Want/Public/css/core.css" rel="stylesheet"/>
<link href="/Theme/Want/Public/css/want.css" rel="stylesheet"/>
<link type="text/css" rel="stylesheet" href="/Public/js/ext/magnific/magnific-popup.css"/>
<script src="/Public/js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,js/core.js,js/com/com.toast.class.js,js/com/com.ucard.js"></script>
<!--Style-->
<!--合并前的js-->
<?php $config = api('Config/lists'); C($config); $count_code=C('COUNT_CODE'); ?>
<script type="text/javascript">
    var ThinkPHP = window.Think = {
        "ROOT": "", //当前网站地址
        "APP": "/index.php?s=", //当前项目地址
        "PUBLIC": "/Public", //项目公共目录地址
        "DEEP": "<?php echo C('URL_PATHINFO_DEPR');?>", //PATHINFO分割符
        "MODEL": ["<?php echo C('URL_MODEL');?>", "<?php echo C('URL_CASE_INSENSITIVE');?>", "<?php echo C('URL_HTML_SUFFIX');?>"],
        "VAR": ["<?php echo C('VAR_MODULE');?>", "<?php echo C('VAR_CONTROLLER');?>", "<?php echo C('VAR_ACTION');?>"],
        'URL_MODEL': "<?php echo C('URL_MODEL');?>",
        'WEIBO_ID': "<?php echo C('SHARE_WEIBO_ID');?>"
    }
    var cookie_config={
        "prefix":"<?php echo C('COOKIE_PREFIX');?>"
    }
    var Config={
        'GET_INFORMATION':<?php echo modC('GET_INFORMATION',1,'Config');?>,
        'GET_INFORMATION_INTERNAL':<?php echo modC('GET_INFORMATION_INTERNAL',10,'Config');?>*1000
    }
    var weibo_comment_order = "<?php echo modC('COMMENT_ORDER',0,'WEIBO');?>";
</script>

<script>
    //全局内容的定义
    var _ROOT_ = "";
    var MID = "<?php echo is_login();?>";
    var MODULE_NAME="<?php echo MODULE_NAME; ?>";
    var ACTION_NAME="<?php echo ACTION_NAME; ?>";
    var CONTROLLER_NAME ="<?php echo CONTROLLER_NAME; ?>";
    var initNum = "<?php echo modC('WEIBO_NUM',140,'WEIBO');?>";
    function adjust_navbar(){
        $('#sub_nav').css('top',$('#nav_bar').height());
        $('#main-container').css('padding-top',$('#nav_bar').height()+$('#sub_nav').height()+20)
    }
</script>

<audio id="music" src="" autoplay="autoplay"></audio>
<?php echo hook('pageHeader');?>
    <link href="/Application/Ucenter/Static/css/center.css" type="text/css" rel="stylesheet">
    <link href="/Application/Ucenter/Static/css/usercenter.css" rel="stylesheet" type="text/css"/> 
</head>
<body>
<?php $sideBarUser = query_user(array('nickname', 'uid', 'title', 'score', 'avatar128'), $uid); $call = $call ? $call : L('_I_'); ?>
<!-- 主体 -->

    <script src="/Public/js/com/com.talker.class.js"></script>
<?php if((is_login()) ): ?><div id="talker">
    </div><?php endif; ?>

<?php D('Common/Member')->need_login(); ?>
<!--[if lt IE 8]>
<div class="alert alert-danger" style="margin-bottom: 0"><?php echo L('_TIP_BROWSER_DEPRECATED_1_');?> <strong><?php echo L('_TIP_BROWSER_DEPRECATED_2_');?></strong><?php echo L('_TIP_BROWSER_DEPRECATED_3_');?> <a target="_blank" href="http://browsehappy.com/"><?php echo L('_TIP_BROWSER_DEPRECATED_4_');?></a><?php echo L('_TIP_BROWSER_DEPRECATED_5_');?></div>
<![endif]-->
<?php $unreadMessage=D('Common/Message')->getHaventReadMeassageAndToasted(is_login()); ?>

<div id="nav_bar" class="nav_bar">
    <div class="container">
        <nav class="" id="nav_bar_container">
            <?php $logo = get_cover(modC('LOGO',0,'Config'),'path'); $logo = $logo?$logo:'/Public/images/logo.png'; ?>
            <a class="navbar-brand logo" href="<?php echo U('Home/Index/index');?>"><img src="<?php echo ($logo); ?>"/></a>
            <div class="" id="nav_bar_main">
                <ul class="nav navbar-nav navbar-left">
                    <?php $__NAV__ = D('Channel')->lists(true);$__NAV__ = list_to_tree($__NAV__, "id", "pid", "_"); if(is_array($__NAV__)): $i = 0; $__LIST__ = $__NAV__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nav): $mod = ($i % 2 );++$i; if(($nav['_']) != ""): ?><li class="dropdown">
                                <a title="<?php echo ($nav["title"]); ?>" class="dropdown-toggle nav_item" data-toggle="dropdown"
                                   href="#"> <?php echo ($nav["title"]); ?> <i class="icon-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <?php if(is_array($nav["_"])): $i = 0; $__LIST__ = $nav["_"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subnav): $mod = ($i % 2 );++$i;?><li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo (get_nav_url($subnav["url"])); ?>" target="<?php if(($subnav["target"]) == "1"): ?>_blank<?php else: ?>_self<?php endif; ?>"><?php echo ($subnav["title"]); ?></a>
                                        </li>
                                        <?php if(($key) == "0"): ?><li class="divider"></li><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                                </ul>
                            </li>
                            <?php else: ?>
                            <li class="<?php if((get_nav_active($nav["url"])) == "1"): ?>active<?php else: endif; ?>">
                                <a title="<?php echo ($nav["title"]); ?>" href="<?php echo (get_nav_url($nav["url"])); ?>"
                                   target="<?php if(($nav["target"]) == "1"): ?>_blank<?php else: ?>_self<?php endif; ?>">
                                    <?php echo ($nav["title"]); ?>
                                    <span class="label label-badge rank-label" title="<?php echo ($nav["band_text"]); ?>"
                                          style="background: <?php echo ($nav["band_color"]); ?> !important;color:white !important;"><?php echo ($nav["band_text"]); ?></span>
                                </a>
                            </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <form class="navbar-form navbar-search navbar-right" role="search">
		            <div class="form-group pull-left">
		              <input type="text" class="form-control" placeholder="搜索话题、树丛或人">
		            </div>
		            <button type="submit" class="btn btn-default pull-left"><i class="iconfont">&#xe622;</i></button>
		        </form>
            </div>
            <!--导航栏菜单项-->
        </nav>
    </div>
</div>
<?php echo hook('setSkin');?>
<div id="tool" class="tool ">
    <?php echo hook('tool');?>
    <?php if(check_auth('Core/Admin/View')): ?><!--  <a href="javascript:;" class="admin-view"></a>--><?php endif; ?>
    <div class="sidebar hidden-xs">
		<ul class="ul1 ">
			<?php if(is_login()): ?><li>
				<a href="<?php echo U('Ucenter/index/index');?>">
					<?php $common_header_user = query_user(array('avatar32')); ?>
					<img class="avatar" src="<?php echo ($common_header_user["avatar32"]); ?>"/>
					<h4>我的树屋</h4>
				</a>
		  	</li>
			<?php else: ?>
			<?php $open_quick_login=modC('OPEN_QUICK_LOGIN', 0, 'USERCONFIG'); $register_type=modC('REGISTER_TYPE','normal','Invite'); $register_type=explode(',',$register_type); $only_open_register=0; if(in_array('invite',$register_type)&&!in_array('normal',$register_type)){ $only_open_register=1; } ?>
            <script>
                var OPEN_QUICK_LOGIN = "<?php echo ($open_quick_login); ?>";
                var ONLY_OPEN_REGISTER = "<?php echo ($only_open_register); ?>";
            </script>
			<li>
				<a data-login="do_login">
					<i class="iconfont">&#xe610;</i>
					<h4>请先登陆</h4>
				</a>
		  	</li><?php endif; ?>
			<li>
				<a href="<?php echo U('Ucenter/Config/index');?>">
					<i class="iconfont">&#xe627;</i>
					<h4>修改资料</h4>
				</a>
		  	</li>
		  	<li>
				<a href="<?php echo U('Ucenter/Index/fans');?>">
					<i class="iconfont">&#xe62e;</i>
					<h4>我的粉丝</h4>
				</a>
		  	</li>
			<li>
				<a href="<?php echo U('Ucenter/Collection/index');?>">
					<i class="iconfont">&#xe619;</i>
					<h4>收藏分享</h4>
				</a>
		  	</li>
		  	<li>
				<a href="<?php echo U('Ucenter/Message/message');?>">
					<i class="iconfont">&#xe633;</i>
					<h4>站内消息</h4>
					<?php if(count($unreadMessage) != 0): ?><span class="badge badge-important" ><?php echo count($unreadMessage);?></span><?php endif; ?>
				</a>
		  	</li>
		  	<?php if(is_login()): if(check_auth('Admin/Index/index')): ?><li>
				<a href="<?php echo U('Admin/Index/index');?>">
					<i class="iconfont">&#xe61e;</i>
					<h4>后台管理</h4>
				</a>
		  	</li><?php endif; ?>
		  	<li>
				<a event-node="logout">
					<i class="iconfont">&#xe623;</i>
					<h4>退出</h4>
				</a>
		  	</li><?php endif; ?>
		</ul>
		
		<ul class="ul2">
			<li>
				<a href="javascript:;">
					<i class="iconfont font28 qr">&#xe640;</i>
					<h4>二维码</h4>
				</a>
				<?php $qrcode = get_cover(modC('QRCODE',0,'Config'),'path'); $qrcode = $qrcode?$qrcode:'/Theme/Want/Public/images/qrcode.png'; ?>
				<div class="showqr">
					<img src="<?php echo ($qrcode); ?>" />
				</div>
		  	</li>
			<li>
				<a id="go-top" href="javascript:;" class="go-top">
					<i class="iconfont">&#xe63d;</i>
					<h4>返回顶部</h4>
				</a>
		  	</li>
		</ul>
	</div>
</div>
<?php if(is_login()&&(get_login_role_audit()==2||get_login_role_audit()==0)){ ?>
<div id="top-role-tip" class="alert alert-danger" style="margin:0;text-align: center;">
    <?php echo L('_TIP_ROLE_NOT_AUDITED1_');?> <strong><?php echo L('_TIP_ROLE_NOT_AUDITED2_');?></strong><?php echo L('_TIP_ROLE_NOT_AUDITED3_');?>
    <a target="_blank" href="<?php echo U('ucenter/config/role');?>"><?php echo L('_TIP_ROLE_NOT_AUDITED4_');?></a>
</div>

<?php } ?>
<?php echo hook('afterTop');?>



    <div class="main-wrapper">
        <div id="main-container" class="container user-config">
            <div class="row">
            	<div class="col-xs-12 usercenter">
			        <div class="uc">
			            <div class="uc_top_bg">
    <?php if($user_info['cover_id']): ?><img class="uc_top_img_bg" src="<?php echo ($user_info['cover_path']); ?>" style="width: 100%;height: 100%">
        <?php else: ?>
        <img class="uc_top_img_bg" src="/Application/Ucenter/Static/images/user_top_default_bg.jpg" style="width: 100%;height: 100%"><?php endif; ?>
    <?php if(is_login() && $user_info['uid'] == is_login()): ?><div class="change_cover"><a data-type="ajax" data-url="<?php echo U('Ucenter/Public/changeCover');?>" data-toggle="modal" data-title="<?php echo L('_UPLOAD_PERSONAL_COVER_');?>" style="color: white;"><img class="img-responsive" src="/Application/Core/Static/images/fractional.png"></a>
        </div><?php endif; ?>
</div>
<div class="row uc_info">
	<div class="col-xs-12">
		<dl>
            <dt style="position: relative;">
                <a href="<?php echo ($user_info["space_url"]); ?>" title="">
                    <img src="<?php echo ($user_info["avatar128"]); ?>" class="avatar-img img-responsive top_img"/>
                </a>
                <div class="sex">
                	<?php if($user_info['sex'] == 2): ?><img src="/Theme/Want/Public/images/nv.png"/><?php else: ?><img src="/Theme/Want/Public/images/nan.png"/><?php endif; ?>
                </div>
            </dt>
            <dd class="text-center margin-bottom-10 margin-top-10" style="color:#FFF;">
            	<?php if($user_info['signature'] == ''): echo L('_NO_IDEA_');?>
                    <?php else: ?>
                    <attr title="<?php echo ($user_info["signature"]); ?>"><?php echo ($user_info["signature"]); ?></attr><?php endif; ?>
            </dd>
            <dd>
                <div>
                    <div class="col-xs-4 text-center top_num followbg">
                        <a href="<?php echo U('Ucenter/Index/following',array('uid'=>$user_info['uid']));?>" title="粉丝数"><?php echo ($user_info["following"]); ?></a> 关注
                    </div>
                    <div class="col-xs-4 text-center top_num fansbg">
                        <a href="<?php echo U('Ucenter/Index/fans',array('uid'=>$user_info['uid']));?>" title="关注数"><?php echo ($user_info["fans"]); ?></a> 粉丝
                    </div>
                    <div class="col-xs-4 text-center top_num postbg">
                        <a href="<?php echo U('Ucenter/Index/following',array('uid'=>$user_info['uid']));?>" title="话题数"><?php echo ($user_info["post_count"]); ?></a> 话题
                    </div>
                </div>
            </dd>
        </dl>
	</div>
</div>
			        </div>
		        </div>
		        <div class="clearfix"></div>
                <div class="col-xs-3" style="width: 290px">
                    <div>
                        <nav class="menu" data-toggle="menu">
                            <ul class="nav nav-primary side-menu">
                                <li id="side_message">
				                    <a href="<?php echo U('Ucenter/Message/message');?>">
				                        <?php echo L('_MESSAGE_CENTER_');?>
				                    </a>
				                </li>
				                <li id="side_collection">
				                    <a href="<?php echo U('Ucenter/Collection/index');?>">
				                        <?php echo L('_MY_FAVORITES_');?>
				                    </a>
				                </li>
                            </ul>
                        </nav>
                        <script>
		                    $('#side_' + "<?php echo ($tabHash); ?>").addClass('active');
		                </script>
                    </div>
                </div>
                <div class="col-xs-9" style="width: 730px">
                    <div id="usercenter-content-td ">
                        <div class="container-fluid common_block_border" style="font-size:12px;">
                            
    <div class="row">
        <div class="col-xs-12">
            <ul class="nav ucenter-tab nav-secondary">
                <li
                <?php if(($tab) == "unread"): ?>class="active"<?php endif; ?>
                ><a href="<?php echo U('Ucenter/Message/message',array('tab'=>'unread'));?>"><?php echo L('_MESSAGE_UNREAD_');?></a></li>
                <li
                <?php if(($tab) == "all"): ?>class="active"<?php endif; ?>
                ><a href="<?php echo U('Ucenter/Message/message',array('tab'=>'all'));?>"><?php echo L('_MESSAGE_ALL_');?></a></li>
            </ul>
        </div>
    </div>
    <?php if(count($messages) == 0): ?><p class="text-muted" style="text-align: center; font-size: 3em;">
        <br><br>
        <?php echo L('_MESSAGE_NONE_');?>
        <br><br><br>
    </p><?php endif; ?>
    <?php if(is_array($messages)): $i = 0; $__LIST__ = $messages;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$message): $mod = ($i % 2 );++$i;?><div class="row message-body">
            <div class="col-xs-2">
                <div class="message_icon">
                    <img style="width: 55%;" class="avatar-img" ucard="<?php echo ($message["from_uid"]); ?>"
                         src="<?php echo ((isset($message["from_user"]["avatar64"]) && ($message["from_user"]["avatar64"] !== ""))?($message["from_user"]["avatar64"]):'./Public/images/default_avatar_64_64.jpg'); ?>"><br/>
                    <?php echo ((isset($message["from_user"]["space_link"]) && ($message["from_user"]["space_link"] !== ""))?($message["from_user"]["space_link"]):L('_VISITOR_')); ?>
                </div>
            </div>
            <div class="col-xs-10">
                <dl style="margin:0;">
                    <dt>
                    <div class="row">
                        <div class="col-xs-9"><a href="<?php echo ($message["content"]["web_url"]); ?>" data-url="<?php echo ($message["content"]["web_url"]); ?>" onclick="Notify.readMessage(this,<?php echo ($message["id"]); ?>)"><?php echo ($message["content"]["title"]); ?></a>
                            <?php if(($message["is_read"]) == "0"): ?><span class="label label-badge label-info"><?php echo L('_UNREAD_');?></span><?php endif; ?>
                        </div>
                        <div class="col-xs-3 message-ctime"><?php echo (friendlydate($message["create_time"])); ?></div>
                    </div>
                    </dt>
                    <dd style="margin-top:10px;"><?php echo ($message["content"]["content"]); ?></dd>
                </dl>
            </div>
        </div><?php endforeach; endif; else: echo "" ;endif; ?>
    <div style="text-align: center;">
        <?php echo getPagination($totalCount);?>
    </div>


                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $(window).resize(function () {
                $("#main-container").css("min-height", $(window).height() - 343);
            }).resize();
        })
    </script>

<!-- /主体 -->

<!-- 底部 -->
<div class="footer-bar ">
    <div class="container">
        <div class="row">
            <div class="col-xs-3">

                <h3>品牌介绍</h3>
                <ul class="friend-link">
                    <?php echo W('Paper/FootBlock/render',array('catid'=>'1'));?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>玩转顽瞳网</h3>
                <ul class="friend-link">
                    <?php echo W('Paper/FootBlock/render',array('catid'=>'3'));?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>友情链接</h3>
                <ul class="friend-link">
                    <?php echo Hook('friendLink');?>
                </ul>
            </div>
            <div class="col-xs-3">
                <h3>版权声明</h3>
                <ul class="friend-link">
                    <li><?php echo text(modC('ABOUT_US',L('_NOT_SET_NOW_'),'Config'));?></li>
                    <li style="font-size:12px"><?php echo text(modC('SUBSCRIB_US',L('_NOT_SET_NOW_'),'Config'));?></li>
                    <li style="font-size:12px"><?php echo text(modC('COPY_RIGHT',L('_NOT_SET_NOW_'),'Config'));?> 闽ICP备14009268号</li>
                    
                </ul>
            </div>
        </div>
        <div class="row text-center">
            <img src="/Theme/Want/Public/images/logo3.png"/>
            <?php echo ($count_code); ?>
        </div>
    </div>
</div>

<link type="text/css" rel="stylesheet" href="/Public/static/qtip/jquery.qtip.css"/>
<link type="text/css" rel="stylesheet" href="/Public/js/ext/atwho/atwho.css"/>
<script src="/Public/js.php?t=js&f=js/com/com.notify.class.js,static/qtip/jquery.qtip.js,js/ext/slimscroll/jquery.slimscroll.min.js,js/ext/magnific/jquery.magnific-popup.min.js,js/ext/jcarouse/jcarousellite.js,js/ext/placeholder/placeholder.js,js/ext/atwho/atwho.js,zui/js/zui.js&v=<?php echo ($site["sys_version"]); ?>.js"></script>
<script type="text/javascript" src="/Public/static/jquery.iframe-transport.js"></script>
<script src="/Public/js/ext/lazyload/lazyload.js"></script>
<script type="text/javascript">
	$(document).ready(function (){
		//二维码显示
		$(".ul2 li:first").hover(function(){
		    $(this).find('.showqr').show();
		},function(){
			$(this).find('.showqr').hide();  
		});
	});
</script>




<!-- 页面footer钩子，一般用于加载插件JS文件和JS代码 -->
<?php echo hook('pageFooter', 'widget');?>
<div class="hidden"><!-- 用于加载统计代码等隐藏元素 -->
    
</div>

<script>
    $(function () {
        var $sidebar = $('#usercenter-sidebar-td');
        var $sidebar_xs = $('#usercenter-sidebar-xs');
        var $sidebar_sm = $('#usercenter-sidebar-sm');
        var $content = $('#usercenter-content-td');

        function trigger_resp() {
            var width = $(window).width();
            if (width < 768) {
                on_xs();
            } else {
                on_sm();
            }
        }

        function on_xs() {
            $sidebar_xs.append($sidebar);
            $content.css({'padding-left': 0, 'padding-right': 0});
        }

        function on_sm() {
            $sidebar_sm.prepend($sidebar);
            $content.css({'padding-left': '50px', 'padding-right': '50px'});
        }

        trigger_resp();

        $(window).resize(function () {
            trigger_resp();
        })
    })
</script>

</body>
</html>